<%@ page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/layouts/include/taglib.jsp" %>

<!-- 任务修改 -->
         <div class="modal " id="taskModen">
             <div class="modal-dialog">
                 <div class="modal-content">
                     <div class="modal-header">
                     <input type="hidden" id="taskId">
                         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                         <ul class="nav nav-tabs" id="myTab2">
							<li class="active">
								<a data-toggle="tab" href="#home2">任务详情</a>
							</li>
							<li>
								<a data-toggle="tab" href="#profile2" id="showRecord">查看历史</a>
							</li>
							<li>
								<a data-toggle="tab" href="#dropdown12" id="showComments">查看评论</a>
							</li>
						</ul>
                     </div>
                     <div class="modal-body">
                     <div class="tabbable tabs-below">
				<div class="tab-content" id="tableTurnTag">
					<div id="home2" class="tab-pane in active">
						<div class="memberbtn" id="memberButton">
                              
                        </div>
                        <div>
	                        <form class="form-horizontal clearfix f-pb15 hidden " role="form" id="submitComment-form">
	                        	<div class="form-group">
	                                 <label class="col-sm-4 control-label no-padding-right" for="submitComment"> 提交备注</label>
	
	                                 <div class="col-sm-8">
	                                    <textarea rows="3" name="submitComment" placeholder="提交备注" class="col-sm-12"></textarea>
	                                 </div>
	                             </div>
								 <button type="button" class="btn-ace pull-right f-mr20 comment-btn-return" >取消</button>
	                             <button type="button" class="btn-ace pull-right  f-mr20 comment-btn-confirm" >确认并提交</button>
	                        	
	                        </form>
                        </div>
                        <div>
						<form class="form-horizontal" role="form" id="taskModen-form">
                             <div class="form-group">
                                 <label class="col-sm-4 control-label no-padding-right" for="taskName"> 任务名 </label>

                                 <div class="col-sm-8">
                                     <input type="hidden" name="uuid"/>
                                     <input type="hidden" name="prjId"/>
                                     <input type="hidden" name="stepId"/>
                                     <input type="hidden" id="prjType">
                                	 <input type="hidden" id="status"/>
                                     <input type="text" name="taskName" placeholder=任务名" class="col-sm-12" maxlength="13"/>
                                 </div>
                             </div>
                   <div class="form-group">
		        		<label class="col-sm-4 control-label no-padding-right" for="taskType">类型</label>
						<div class="col-sm-8">
							<tags:select type="pmTaskType" name="taskType" id="taskType"></tags:select>
							<!-- <input type="text" name="taskType" placeholder="任务类型" class="col-sm-12"/> -->
						</div>
		        	</div>
		        	 
		        	<div class="form-group">
                                 <label class="col-sm-4 control-label no-padding-right" for=""> 开始日期</label>

                                 <div class="col-sm-8">
                                 	<div class="input-group input-group-sm">
                                     	<input data-provide="datepicker"  type="text" name="startDate" class="form-control" placeholder="开始日期"/>
                                     	<span class="input-group-addon">
									<i class="icon-calendar"></i>
								</span>
                                     </div>
                                 </div>
                             </div>
                             <div class="form-group">
                                 <label class="col-sm-4 control-label no-padding-right" for=""> 截止日期 </label>

                                 <div class="col-sm-8">
                                 	<div class="input-group input-group-sm">
                                     	<input data-provide="datepicker"  type="text" name="endDate" class="form-control" placeholder="截止日期"/>
                                     	<span class="input-group-addon">
									<i class="icon-calendar"></i>
								</span>
                                     </div>
                                 </div>
                             </div>
                             <div class="form-group">
                                 <label class="col-sm-4 control-label no-padding-right" for="empNo"> 任务人员 </label>

                                 <div class="col-sm-8">
                                    <tags:select type="${param.prjId }" dataUrl="/pm/team/findByPrjId.do?prjId=${param.prjId }"
                                          name="empNo" id="empNoEdit" optionValue="empNo"
                                          optionName="empName"></tags:select>
                                 </div>
                             </div>
                             <div class="form-group">
                                 <label class="col-sm-4 control-label no-padding-right" for="empNos"> 协作人员 </label>
									
                                 <div class="col-sm-8">
                                 
                                 					 <select multiple="" class="width-80 chosen-select" name="empNos" value="maohai" id="form-field-select-4" data-placeholder="Choose a Member...">
																<option value="">&nbsp;</option>
																
													 </select>
                                 </div>
                             </div>
                             <div class="form-group">
                                 <label class="col-sm-4 control-label no-padding-right" for="depict"> 备注 </label>

                                 <div class="col-sm-8">
                                     <textarea rows="3" name="depict" placeholder="备注" class="col-sm-12"></textarea>
                                 </div>
                             </div>
                             <div class="form-group f-pb15 f-bb">
                                 <label class="col-sm-4 control-label no-padding-right"></label>
                                 <div class="col-sm-8">
               						 <a class="btn btn-info bigger-130 task-upload-control" id="taskFileUpload"><i class="icon-upload-alt"></i> 上传成果</a>
               						 &nbsp;&nbsp;&nbsp;&nbsp;
									<a href="#" id="comment-upload-doc-task"><i class="icon-upload"></i> 上传意见文档</a>
						 <!-- 进度条  -->
							<div class="progress progress-striped active" id="file-active-comment-task" style="display: none">
								<div class="progress-bar progress-bar-success" id="progress-task" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
									<span class="sr-only">上传中</span>
								</div>
							</div>
							
                                 </div>
                             </div>
                             <!-- 进度条  -->
							<div class="progress progress-striped active" id="fileActive" style="display: none">
								<div class="progress-bar progress-bar-success" id="progress" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
									<span class="sr-only">上传中</span>
								</div>
							</div>
                             <ul class="taskfilelist list-unstyled" id="taskFileList"></ul>
                            
                         </form>
                         </div>
					</div>
					<!-- 查看历史 -->
					<div id="profile2" class="tab-pane">
							<div class="table-responsive">
								<div  id="record" class="tab-pane">
										
												
								</div>
							</div>
					</div>

					<div id="dropdown12" class="tab-pane">
						<div class="commentList">
							<a href="#" id="comment-btn-new" ><i class="icon-plus"></i> 新增评论</a>
							
						
							<div id="comment-form-div-top">
								<div id="comment-form-div">
									<form action="" id="comment-form">
										<input type="hidden" name="busitableKey" id="busitableKey"/>
										<input type="hidden" name="parentId"  id="parentId" />
										<input type="hidden" name="topId"  id="topId" />
										<textarea rows="3" cols="50" class="form-group input-sm" id="comment" name="comment" placeholder="我也说一句" ></textarea>
										<div>
											<div class="col-sm-7"></div>
											<div class="col-sm-5">
												<a href="#"  id="comment-btn-save"><i class="icon-ok-circle"></i> 评论</a>
												&nbsp;&nbsp;
												<a href="#" id="comment-btn-close"><i class="icon-remove-circle"></i> 取消</a>
											</div>
										</div>
									</form>
								</div> 
							</div>
							<div>
								<ul id="commentList">
									
								</ul>
							</div>
							
							
							
						</div>
					</div>
				</div>

			</div>
                         
                     </div>
                     <!-- <div class="modal-footer">
                     	
                     </div> -->
                 </div>
                 <!-- /.modal-content -->
             </div>
             <!-- /.modal-dialog -->
         </div>
         <!-- /.modal -->
         
         <%--
		<script src="${ctx}/static/ace/assets/js/fuelux/fuelux.spinner.min.js"></script>
		<script src="${ctx}/static/ace/assets/js/bootstrap-colorpicker.min.js"></script>
		<script src="${ctx}/static/ace/assets/js/jquery.knob.min.js"></script>
		<script src="${ctx}/static/ace/assets/js/jquery.autosize.min.js"></script>
		<script src="${ctx}/static/ace/assets/js/jquery.inputlimiter.1.3.1.min.js"></script>
		<script src="${ctx}/static/ace/assets/js/jquery.maskedinput.min.js"></script>
		<script src="${ctx}/static/ace/assets/js/bootstrap-tag.min.js"></script>
          --%>
         
         
         
         
<!-- 任务成员按钮模板 -->
<script id="taskMemberButtonMtp" type="x-tmpl-mustache">
	{{#data}}
        <button type="button" class="btn-ace f-mr20" data-dismiss="modal">关闭</button>
		{{#isMember}}
			<button type="button" path="/pm/task/complete.do" class="btn-ace f-mr20 taskModen-btn-complete " >提交任务</button>
		{{/isMember}}
		{{#isPrincipal}}
        	<button type="button" class="btn-ace f-mr20 taskModen-btn-save" >保存</button>
		{{/isPrincipal}}
		{{#isSubmit}}
			<button type="button" path="/pm/task/auditComplete.do" class="btn-ace f-mr20 taskModen-btn-auditComplete" >确认完成</button>
			<button type="button" path="/pm/task/rejectTask.do" class="btn-ace f-mr20 taskModen-btn-rejectTask" >退回</button>
		{{/isSubmit}}
	{{/data}}
</script>


<!-- 评论显示板块 -->
<script id="commentMt" type="x-tmpl-mustache">

	{{#data}}					
	<li>
			&nbsp;<small style="color:silver;">{{createEmp}}</small>&nbsp;回复&nbsp;<small style="color:silver;">{{replyToEmp}}</small>
			&nbsp;：{{comment}}&nbsp;&nbsp;{{#formatDt}}{{createDt}}{{/formatDt}}&nbsp;&nbsp;&nbsp;&nbsp;
			{{#isNotMyself}}
				<span  class="replyComment" id="{{uuid}}" topId="{{topId}}" replyToEmp="{{createEmp}}" replyToEmpNo="{{createEmpNo}}"><i class="icon-comment-alt"></i></span>
			{{/isNotMyself}}	
			{{#isMyselfCmt}}
			&nbsp;&nbsp;<span id="{{uuid}}" class="deleteComment" style="color:red"><i class="icon-trash"></i></span>
			{{/isMyselfCmt}}
			<div id="reply{{uuid}}"></div>
			{{#childList}}	
				<ul>
					<li class="childStyle" type="circle" style="padding:0 0 0 10px;">
							&nbsp;<small style="color:silver;">{{createEmp}}</small>&nbsp;回复&nbsp;<small style="color:silver;">{{replyToEmp}}</small>
							&nbsp;：{{comment}}&nbsp;&nbsp;{{#formatDt}}{{createDt}}{{/formatDt}}&nbsp;&nbsp;&nbsp;&nbsp;
							{{#isNotMyself}}
								<span  class="replyComment" id="{{uuid}}" topId="{{topId}}" replyToEmp="{{createEmp}}" replyToEmpNo="{{createEmpNo}}"><i class="icon-comment-alt"></i></span>
							{{/isNotMyself}}	
							{{#isMyselfCmt}}
							&nbsp;&nbsp;<span id="{{uuid}}" class="deleteComment" style="color:red" ><i class="icon-trash"></i></span>
							{{/isMyselfCmt}}
							<div id="reply{{uuid}}"></div>
					</li>
				</ul>
			{{/childList}}
			
	</li>
	{{/data}}
</script>
<!-- 查看历史记录 -->
<script id="showListRecordModel" type="x-tmpl-mustache">
		<ul class="item-list" >	
			<li class="text-warning bigger-110 orange clearfix item-orange">
				<label class="inline col-sm-12">
					<span class="lbl">任务历史记录</span>
				</label>	
				
			</li>									
			{{#data}}
			<li class="text-warning bigger-110 orange clearfix item-orange">
				<label class="inline col-sm-12">
					<span class="lbl">{{#formatDt}}{{logTm}}{{/formatDt}}&nbsp;&nbsp;{{empNo}}&nbsp;&nbsp;
					{{#formatType}}{{operaterType}}{{/formatType}}&nbsp;&nbsp;{{name}}
					&nbsp;&nbsp;--->{{newVal}}</span>
				</label>	
				
			</li>
		{{/data}}	
	</ul> 	
 </script>
<!--  模板下拉框 -->
 <script id="showSelectModel" type="x-tmpl-mustache">
				
 	{{#data}}
       <option value="{{uuid}}">{{tpName}}</option>
	{{/data}}
 	   <option value="">新建</option>

 </script>
 

